<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich" template="layout/template.xhtml">

	<ui:define name="body">

		<h:form id="userForm">

			<rich:panel>
				<f:facet name="header">user</f:facet>

				<s:decorate id="idField" template="layout/edit.xhtml">
					<ui:define name="label">Id</ui:define>
					<h:inputText id="id" required="true"
						value="#{userHome.instance.id}" />
				</s:decorate>

				<s:decorate id="loginField" template="layout/edit.xhtml">
					<ui:define name="label">Login</ui:define>
					<h:inputText id="login" required="true"
						value="#{userHome.instance.login}" />
				</s:decorate>

				<s:decorate id="emailField" template="layout/edit.xhtml">
					<ui:define name="label">Email</ui:define>
					<h:inputText id="email" required="true"
						value="#{userHome.instance.email}" />
				</s:decorate>
				<div style="clear: both" />

			</rich:panel>

			<div class="actionButtons"><h:commandButton id="save"
				value="Save" action="#{userHome.persist}"
				rendered="#{!userHome.managed}" /> <h:commandButton id="update"
				value="Save" action="#{userHome.update}"
				rendered="#{userHome.managed}" /> <h:commandButton id="delete"
				value="Delete" action="#{userHome.remove}" immediate="true"
				rendered="#{userHome.managed}" /> <s:button propagation="end"
				id="cancel" value="Cancel" view="/usersList.xhtml" /></div>

		</h:form>

	</ui:define>

</ui:composition>
